import axios from 'axios'

export default class DeviceOilUsedService {
    static deviceOilUsedService = null

    static getInstance(){
        if(this.deviceOilUsedService == null){
            this.deviceOilUsedService = new DeviceOilUsedService()
        }
        return this.deviceOilUsedService
    }

    //添加
    save(params){
        return axios.post(`http://localhost/deviceOilUseds`,params)
    }

    list(params){
        return axios.get(`http://localhost/deviceOilUseds`,{
            params
        })
    }

    listNopage(params){
        return axios.get(`http://localhost/deviceOilUseds/listNopage`,{
            params:params
        })
    }


    //修改
    update(params){
        return axios.put(`http://localhost/deviceOilUseds`,params)
    }

    selectEnclosures(attachIds){
        return axios.get(`http://localhost/deviceOilUseds/selectEnclosures/${attachIds}`)
    }

    selectMaterialInfos(id){
        return axios.get(`http://localhost/deviceOilUseds/selectMaterialInfos/${id}`)
    }
}